<template>
  <div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/company' }">公司管理</el-breadcrumb-item>
      <el-breadcrumb-item>公司详情</el-breadcrumb-item>
    </el-breadcrumb>
    <el-divider></el-divider>
    <p style="font-size:20px;font-weight:500">公司详情</p>
    <!-- <el-button type="success" @click="back">←返回</el-button> -->
    <el-table
      :data="list"
      style="width: 100%">
      <el-table-column label="公司名称">
        <template slot-scope="scope">
          <span>{{scope.row.ename}}</span>
        </template>
      </el-table-column>
      <el-table-column label="公司地址">
        <template slot-scope="scope">
          <span>{{scope.row.eaddr}}</span>
        </template>
      </el-table-column>
      <el-table-column label="营业执照">
        <template slot-scope="scope">
          <span>{{scope.row.eflag}}</span>
        </template>
      </el-table-column>
      <el-table-column label="头像">
        <template slot-scope="scope">
          <span>{{scope.row.eimg}}</span>
        </template>
      </el-table-column>
      <el-table-column label="手机号">
        <template slot-scope="scope">
          <span>{{scope.row.phone}}</span>
        </template>
      </el-table-column>
      <el-table-column label="公司类型">
        <template slot-scope="scope">
          <span>{{scope.row.etype}}</span>
        </template>
      </el-table-column>
      <el-table-column label="状态码">
        <template slot-scope="scope">
          <span>{{scope.row.status}}</span>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>

export default {
  data(){
    return {
      // list: [{Ename:'1'}]
      list: []
    }
  },
  created(){
    console.log(this.$route.query.eid);
    this.getData()
  },
  methods: {
    getData(){
      this.$http({
        url: '/admin/Enterprise/getOne',
        params: {
          eid: this.$route.query.eid
        }
      }).then(res => {
        console.log(res);
        this.list.push(res)  
        console.log(this.list);
      })
    },
    /* back(){
      this.$router.back()
    }, */
  }
}
</script>

<style scoped>
.el-button{
  margin-bottom: 20px;
}
</style>